#template('colorThemeInit.vm')
.extension-item {
  border-color: $theme.borderColor $theme.pageContentBackgroundColor $theme.pageContentBackgroundColor $theme.borderColor;
  border-style: solid solid solid;
  border-width: 1px 4px 1px 1px;
  display: block;
  box-shadow:  1px 0 0 $theme.borderColor;
  margin-right: 1px;
  position: relative;
}
.extension-item > * {
  padding: 0.8em 1em 1em 2.7em;
}
.extension-item:last-of-type {
  border-bottom-color: $theme.borderColor;
}

.extension-title {
  color: $theme.titleColor;
  font-size: 1.2em;
  font-weight: 700;
  border: none;
  background: none no-repeat scroll 0.2em 0.3em transparent;
  margin: 0 0 0 -1.8em;
  padding: 2px 0 2px 1.8em;
}

.extension-version, .extension-namespace {
  color: $theme.textSecondaryColor;
  margin-left: 1em;
  font-weight: normal;
  font-size: .8em;
}

.extension-item:hover .extension-header {
  background-color: $theme.highlightColor;
}
.extension-header .buttonwrapper {
  margin: 0 0 0 5px;
}

/*Supported By*/

.supported-by {
  color: $theme.textColor;
}

.supported-by h3,
.supported-by h4{
  font-size: 1.1rem;
  opacity: .5;
  font-weight: 600;
  text-transform: uppercase;
}

.supporter-listing {
  position: relative;
  left: -6px;
}

.support-multi-plan {
  position: relative;
  padding: 4px 0px;
}

.supporter-name {
  font-weight: 600;
  padding: 0px 6px;
}

.support-multi-name {
  cursor: pointer;
}

.support-multi-name:hover {
  background-color: rgba(0,0,0,0.1);
  border-radius: 56px;
}

.plan-name.infomessage {
  border-radius: 96px;
  white-space: nowrap;
  font-size: 1.2rem;
  padding: 4px 6px;
}

.plan-name.infomessage a {
  text-decoration: none;
}

.support-dialog {
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 8px;
  padding: 12px 16px;
  position: absolute;
  display: none;
  top: 24px;
  left: 0;
  z-index: 1;
}

.support-dialog.open {
  display: block;
}

.support-flex {
  display: flex;
  gap: 8px;
}

/*--end supported by*/

.extension-actions {
  clear: right;
  float: right;
  text-align: right;
}
/* Display the drop-down menu of a button group on top of the extension to make sure it is visible. */
.extension-actions .button-group > .dropdown-menu {
  left: auto;
  right: 0;
}

.extension-rating {
  clear: right;
  float: right;
  margin-top: 10px;
}

.extension-status {
  font-size: 0.8em;
  font-weight: normal;
  margin: 3px 0 0 0;
  display: block;
}

h2.extension-title .extension-status {
  font-size: 0.7em;
}

.extension-authors {
  color: $theme.textSecondaryColor;
  font-size: .9em;
}

.extension-item-core .extension-status,
.extension-item-installed-dependency .extension-status,
/* We have to duplicate the selectors to force the style to be applied to extension dependencies, which are nested inside extension display. */
.extension-item .extension-item-core .extension-status,
.extension-item .extension-item-installed-dependency .extension-status {
  color: $theme.textSecondaryColor;
}
.extension-item-installed .extension-status,
.extension-item .extension-item-installed .extension-status {
  color: $theme.notificationSuccessColor;
}
.extension-item-remote-core .extension-status,
.extension-item-remote-installed .extension-status,
.extension-item-remote-installed-dependency .extension-status,
.extension-item .extension-item-remote-core .extension-status,
.extension-item .extension-item-remote-installed .extension-status,
.extension-item .extension-item-remote-installed-dependency .extension-status {
  color: $theme.notificationWarningColor;
}
.extension-item-installed-invalid .extension-status, .extension-item-remote-installed-invalid .extension-status,
.extension-item .extension-item-installed-invalid .extension-status, .extension-item .extension-item-remote-installed-invalid .extension-status,
/* This applies only to dependencies. */
.extension-item-remote-core-incompatible .extension-status, .extension-item-remote-installed-incompatible .extension-status {
  color: $theme.notificationErrorColor;
}

.extension-summary {
  font-size: .9em;
  margin-top: .5em;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.extension-recommended {
  margin-top: .5em;
  color: $theme.notificationSuccessColor
}

.extension-body {
  border: 1px dotted $theme.borderColor;;
  padding: 0 .8em .8em 1.8em !important;
  margin: 0 1em 1em;
}
.extension-body.loading {
  padding: 16px !important;
}

*[id^="extension-body-"]:target {
  display: none;
}
*[class^="extension-body-"] {
  display: none;
  font-size: 0.9em;
  /* Make sure we have space for the loading animation. */
  min-height: 16px;
}
*[id^="extension-body-"]:target + *[class^="extension-body-"] {
  display: block;
}

dl.extension-body-section,
.extension-body-section > dl {
  margin: 0;
}
dl.extension-body-section > dt,
.extension-body-section > dl > dt {
  color: $theme.textSecondaryColor;
  font-weight: normal;
}
dl.extension-body-section > dd + dt,
dl.extension-body-section > dt + dt,
.extension-body-section > dl > dd + dt,
.extension-body-section > dl > dt + dt {
  margin-top: .7em;
}

dl.extension-body-description > dd > ul {
  list-style-position: inside;
  margin: 0;
  padding: 0;
}

ul.dependencies {
  border-top: 1px dotted #E8E8E8;
  list-style-type: none;
  margin: .5em 0 0;
  /* This should accommodate 10 items */
  max-height: 268px;
  overflow: auto;
  padding: 0;
}
ul.dependencies li:hover {
  background-color: $theme.highlightColor;
}
.dependency-item {
  background: transparent none no-repeat left;
  border-bottom: 1px dotted #E8E8E8;
  border-right: 7px solid $theme.pageContentBackgroundColor;
  padding: 0.3em 0 0.3em 20px;
  position: relative;
}
.dependency-item {
  line-height: 1.4em;
}
.dependency-item .extension-status {
  margin: 0;
}
.extension-item-core .extension-title, .extension-item-remote-core .extension-title,
.dependency-item.extension-item-core, .dependency-item.extension-item-remote-core, .dependency-item.extension-item-remote-core-incompatible {
  background-image: url("$xwiki.getSkinFile('icons/silk/cog.png')");
}
.extension-item-installed .extension-title, .extension-item-remote-installed .extension-title,
.extension-item-installed-dependency .extension-title, .extension-item-remote-installed-dependency .extension-title,
.extension-item-installed-invalid .extension-title, .extension-item-remote-installed-invalid .extension-title,
.dependency-item.extension-item-installed, .dependency-item.extension-item-remote-installed,
.dependency-item.extension-item-installed-invalid, .dependency-item.extension-item-remote-installed-invalid,
.dependency-item.extension-item-installed-dependency, .dependency-item.extension-item-remote-installed-dependency,
.dependency-item.extension-item-remote-installed-incompatible {
  background-image: url("$xwiki.getSkinFile('icons/silk/plugin.png')");
}
.extension-item-remote .extension-title, .dependency-item.extension-item-remote {
  background-image: url("$xwiki.getSkinFile('icons/silk/world.png')");
}
.extension-item-loading .extension-title, .dependency-item.extension-item-loading {
  background-image: url("$xwiki.getSkinFile('icons/xwiki/spinner.gif')");
}
.dependency-item.extension-item-unknown {
  background-image: url("$xwiki.getSkinFile('icons/silk/plugin_error.png')");
}

.extension-item-core,
.extension-item-installed-dependency {
  border-right-color: $theme.textSecondaryColor;
}
.extension-item-installed {
  border-right-color: $theme.notificationSuccessColor;
}
.extension-item-remote-installed,
.extension-item-remote-installed-dependency,
.extension-item-remote-core {
  border-right-color: $theme.notificationWarningColor;
}
.extension-item-installed-invalid, .extension-item-remote-installed-invalid,
.extension-item-remote-core-incompatible, .extension-item-remote-installed-incompatible {
  border-right-color: $theme.notificationErrorColor;
}

.extension-diff-title {
  margin: 1.2em 0 .6em;
}
.extension-diff-options {
  margin-bottom: .6em;
}
.extension-diff-options .label {
  color: $theme.textColor;
  font-size: 0.85em;
  font-weight: 700;
  margin-right: 0.3em;
  text-transform: uppercase;
}
.extension-diff-options select {
  margin-right: 0.3em;
  width: auto;
}

.extension-search-bar {
  background-color: $theme.panelCollapsedBackgroundColor;
  border: 1px solid $theme.borderColor;
  border-bottom: 0;
  color: $theme.panelCollapsedTextColor;
  font-size: .8em;
  padding: .3em 1.2em .3em .3em;
  position: relative;
}

#extension-search-simple {
  float: left;
}
#extensionSearchInput {
  background: url("$xwiki.getSkinFile('icons/xwiki/search.png')") no-repeat scroll left center $theme.pageContentBackgroundColor;
  padding-left: 18px;
}

#extensionSearchRepositoryList {
  padding: 3px;
}

@media (max-width: 480px) {
  #extensionSearchInput, #extensionSearchRepositoryList {
    margin: 0 0 .3em;
    width: 100%;
  }
}

#extension-search-advanced {
  float: right;
  margin: 8px 0 0;
}

#extension-search-advanced legend {
  font-size: .875em;
  margin: 0;
  border: 0 none;
  text-align: right;
}

#extension-search-advanced legend a:after, a.extension-versions-link:after {
  content: " \bb";
}
#extension-search-advanced legend a.expanded:after {
  color: transparent;
}
#extension-search-advanced-body {
  display: none;
}
#extension-search-advanced-body:target ~ div.hidden {
  /* The 'hidden' class forces display:none using !important so we have to use it too in order to overwrite it.  */
  display: block !important;
}
.extension-search-advanced-popup {
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.25);
  padding: .3em .5em;
  position: absolute;
  right: 1.2em;
  text-align: left;
  width: 40%;
  z-index: 200;
}

ul.innerMenu {
  color: $theme.textSecondaryColor;
  font-size: 1em;
  font-size: 0.8em;
  padding: 0 0 .1em;
  margin: -5px 0 1em 0 !important;
}
.innerMenu li {
  display: inline-block;
  sborder: 1px solid red;
  vertical-align: top;
  margin-left: -1px;
}
.innerMenu li a {
  border-radius: 7px 7px 0 0 / 5px 5px 0 0;
  border-top: 3px solid $theme.borderColor;
  display: inline-block;
  margin: 2px 2em 0 0;
  padding: 6px .5em .2em;
  position: relative;
  top: 0px;
}
.innerMenu li a:hover {
  border-radius: 8px 8px 0 0;
  border-top: 5px solid $theme.borderColor;
  margin-top: 0px;
}
.innerMenu li a.current {
  background-color: $theme.panelCollapsedBackgroundColor;
  border: 0 none;
  border-top: 5px solid $theme.panelCollapsedBackgroundColor;
  margin-top: 0;
  border-radius: 0 0 8px 8px;
  box-shadow: 3px;
}
.innerMenu li a.current:after {
  border-style: solid;
  border-color: transparent transparent  $theme.borderColor;
  border-width: 0 5px 5px 0;
  width: 0;
  display: block;
  position: absolute;
  height: 0;
  content: "";
  top: -5px;
  right: -5px;
}
.innerMenu li a.current {
  color: $theme.panelCollapsedTextColor;
  text-decoration: none;
}

.extensionUpdater > .ui-progress {
  margin-bottom: .5em;
}
.extensionUpdater > .extension-body-progress {
  display: block;
}
/* The font size is smaller and the text is not aligned with the pagination control icons. */
.extensionUpdater .paginationFilter .resultsNo, .extensionUpdater .paginationFilter .pagination {
  padding-top: .3em;
}

.xLabel {
  font-weight: 700;
  margin: 1.2em 0 0.3em 0;
  text-transform: uppercase;
}
.xHint {
  color: $theme.textSecondaryColor;
  font-size: smaller;
  margin: 0.3em 0;
}

/* Document Tree */
ul.document-tree {
  margin: 0;
}
.document-tree ul {
  /* Reduce the default identation. */
  margin-left: 1.3em;
  padding: 0;
}
.document-tree li {
  list-style-type: none;
}
.document-tree .node {
  background: none no-repeat scroll 2px center transparent;
  padding: 2px 2px 2px 20px;
  /* Node actions have absolute position. */
  position: relative;
}
.document-tree .node:hover {
  background-color: $theme.highlightColor;
}
.document-tree .node .locale {
  color: $theme.textSecondaryColor;
  font-style: italic;
  padding-left: .2em;
}
.document-tree .node .locale:before {
  content: '(';
}
.document-tree .node .locale:after {
  content: ')';
}
.document-tree .node .actions {
  position: absolute;
  right: 2px;
}
.document-tree .wiki.node {
  background-image: url("$xwiki.getSkinFile('icons/silk/world.png')")
}
.document-tree .space.node {
  background-image: url("$xwiki.getSkinFile('icons/silk/folder.png')")
}
.document-tree .document.node {
  background-image: url("$xwiki.getSkinFile('icons/silk/page_white.png')")
}
.document-tree .document.parent.node {
  background-image: url("$xwiki.getSkinFile('icons/silk/page_white_stack.png')")
}
.document-tree .locale.node {
  background-image: url("$xwiki.getSkinFile('icons/silk/page_white_world.png')")
}
.document-tree .wiki.node, .document-tree .space.node {
  font-weight: bolder;
}
/* Collapsible */
ul.collapsible.document-tree {
  /* Leave space for the +/- icons.  */
  padding-left: 1em;
}
.collapsible.document-tree li.collapsed ul {
  display: none;
}
.collapsible.document-tree .node {
  /* Overwrite the left padding because it is set below by the +/- icon. */
  padding: 2px;
}
.collapsible.document-tree .node:before {
  /* Reserve the space so that all siblings are aligned even if not all of them have children. */
  content: '\229F';
  /* Display the +/- icon outside. This integrates nicely with highlightable nodes. */
  margin-left: -1em;
  /* Leave space for the node icon. */
  padding-right: 20px;
  visibility: hidden;
}
.collapsible.document-tree .parent.node {
  /* Parent nodes can be collapsed / expanded so we display a different cursor. */
  cursor: pointer;
}
.collapsible.document-tree .parent.node:before {
  /* The '+' icon. */
  content: '\229F';
  visibility: visible;
}
.collapsible.document-tree li.collapsed .parent.node:before {
  /* The '-' icon. */
  content: '\229E';
}
/* Selectable */
.selectable.document-tree input[type="checkbox"] {
  /* There's some default margin that breaks the alignment. */
  margin: 0;
  /* Make sure the selected count is aligned correctly. */
  vertical-align: middle;
}
.selectable.document-tree .selectedCount {
  color: $theme.textSecondaryColor;
  font-size: .8em;
  /* Bold is inherited from wiki and space nodes so we need to overwrite it. */
  font-weight: normal;
  padding-right: .3em;
}

/* Media query for screens wider than Bootstrap @screen-md-min */
@media (min-width: 992px) {
  /* Display the extension title and status on a single row on md screens */
  .extension-title, .dependency-item {
    display: flex;
    align-items: center;
    justify-content: start;
  }
  .extension-status {
    flex-grow: 1;
    text-align: right;
    margin: 0;
  }
  /* Add margin for the case when the dependency-item has a right border (eg .extension-item-remote-installed). */
  .dependency-item .extension-status {
    padding-right: 1em;
  }
}
